<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script src="./jquery.min.js"></script>
</head>

<body>
    index.html

    <input type="button" value="jsonp">

    <script>
        function  jsonp(data){
            console.log(data)
        }

        function  abc(data){
            console.log(data,66666)
        }

        $('input').on('click', function () {
            // $.ajax({
            //     url: 'http://127.0.0.1:2000/jsonp',
            //     type: 'get',
            //     data: {},
            //     dataType: 'jsonp',
            //     jsonpCallback:'abc',
            //     success: function (res) {  //  jsonp(123)    abc(123)
            //         console.log(res, 8888)  //jsonp(123)     abc(123)
            //     },
            // })

            var  script=document.createElement('script')
            script.src='http://127.0.0.1:2000/jsonp?callback=abc'
                
            document.body.appendChild(script)


          


        })

    </script>


<!-- <script src="http://127.0.0.1:2000/jsonp"></script> -->
</body>

</html>